n=int(input())

d=set()

ps=[]

result=[0,0,0,0,0]

for i in range(0,n):
    x,y=map(int,input().split())
    s=str(x)+","+str(y)
    d.add(s)
    ps.append([x,y])

turn_sxzy=[[-1,0],[1,0],[0,1],[0,-1]]
turn_pf=[[1,1],[1,-1],[-1,1],[-1,-1]]

for p in ps:
    flag=True
    for k in range(0,4):
        i=p[0]+turn_sxzy[k][0]
        j=p[1]+turn_sxzy[k][1]
        if str(i)+","+str(j) not in d:
            flag=False
            break
    if flag:
        idx=0
        for k in range(0,4):
            i=p[0]+turn_pf[k][0]
            j=p[1]+turn_pf[k][1]
            if str(i)+","+str(j) in d:
                idx+=1
        result[idx]+=1

for item in result:
    print(item)